package com.huawei.cloud.phone.management.domain.phone;

import com.huawei.cloud.phone.management.domain.user.IUserEventCallback;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;

@AllArgsConstructor
@Component("phoneUserEventCallback")
public class UserEventCallback implements IUserEventCallback {
    private final PhoneDomainService phoneDomainService;

    @Override
    public void addUser(String userId) {
        phoneDomainService.addUserPhone(new UserPhone(userId));
    }
}
